package xcmg.device.service.vo.purchase;

import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 外部接口调用
 *
 * @author wangyong
 */
public class PurchaseRequestExternalVO {

  /**
   * 数据来源：0 徐工电商，1 挖机CRM，2 进出口
   */
  public static final String SOURCE_E_COMMERCE = "0", SOURCE_CRM = "1", SOURCE_JCK = "2", SOURCE_GSS = "3";

  /**
   * 采购人电话
   */
  private String phone;

  /**
   *采购人名称
   */
  private String userName;

  /**
   * 采购方地址
   */
  private String address;

  /**
   * 备注
   */
  private String remark;


  /**
   * 订单数据来源：0电商，1CRM
   */
  private String source;

  /**
   * 代理商sapCode（CRM使用字段）
   */
  private String agentSapCode;

  /**
   * 代理商名称
   */
  private String agentName;

  /**
   * 店铺对应代理商的sapCode（仅徐工电商使用）
   */
  private String storeSapCode;

  /**
   * 主机厂sapCode
   */
  private String sapCode;


  private List<PurchaseRequestDetailVO> materials;

////////////////////2018.12.13新增字段////////////////////////
  /**
   * 申请单号（CRM）
   */
  private String applicationNo;

  /**
   * 服务单号（CRM）
   */
  private String serviceNo;

  /**
   * 整改通知单号
   */
  private String notificationNo;

  /**
   * 申请时间
   */
  private String applicationTime;

  /**
   * 备件编码
   */
  private String deviceNo;

  /**
   * 申请数量
   */
  private Integer applicationQty;

  ////////////////////2019.2.15新增字段（进出口调用）////////////////////////

  /**
   * 调度员名称
   */
  private String dispatcherName;

  /**
   * 申请人
   */
  private String applicationName;


  /**
   * 收货信息
   */
  private String receiverName;

  private String receiverAddress;

  private String receiverFax;

  private String receiverTel;

  /**
   * 发运方式
   */
  private String shippingMethod;

  public String getAgentName() {
    return agentName;
  }

  public void setAgentName(String agentName) {
    this.agentName = agentName;
  }

  public String getShippingMethod() {
    return shippingMethod;
  }

  public void setShippingMethod(String shippingMethod) {
    this.shippingMethod = shippingMethod;
  }

  public String getReceiverName() {
    return receiverName;
  }

  public void setReceiverName(String receiverName) {
    this.receiverName = receiverName;
  }

  public String getReceiverAddress() {
    return receiverAddress;
  }

  public void setReceiverAddress(String receiverAddress) {
    this.receiverAddress = receiverAddress;
  }

  public String getReceiverFax() {
    return receiverFax;
  }

  public void setReceiverFax(String receiverFax) {
    this.receiverFax = receiverFax;
  }

  public String getReceiverTel() {
    return receiverTel;
  }

  public void setReceiverTel(String receiverTel) {
    this.receiverTel = receiverTel;
  }

  public String getDispatcherName() {
    return dispatcherName;
  }

  public void setDispatcherName(String dispatcherName) {
    this.dispatcherName = dispatcherName;
  }

  public String getApplicationName() {
    return applicationName;
  }

  public void setApplicationName(String applicationName) {
    this.applicationName = applicationName;
  }

  public String getSapCode() {
    return sapCode;
  }

  public void setSapCode(String sapCode) {
    this.sapCode = sapCode;
  }

  public String getStoreSapCode() {
    return storeSapCode;
  }

  public void setStoreSapCode(String storeSapCode) {
    this.storeSapCode = storeSapCode;
  }

  public String getAgentSapCode() {
    return agentSapCode;
  }

  public void setAgentSapCode(String agentSapCode) {
    this.agentSapCode = agentSapCode;
  }

  public String getSource() {
    return source;
  }

  public void setSource(String source) {
    this.source = source;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public List<PurchaseRequestDetailVO> getMaterials() {
    return materials;
  }

  public void setMaterials(
      List<PurchaseRequestDetailVO> materials) {
    this.materials = materials;
  }

  public static String getSourceECommerce() {
    return SOURCE_E_COMMERCE;
  }

  public static String getSourceCrm() {
    return SOURCE_CRM;
  }

  public String getApplicationNo() {
    return applicationNo;
  }

  public void setApplicationNo(String applicationNo) {
    this.applicationNo = applicationNo;
  }

  public String getServiceNo() {
    return serviceNo;
  }

  public void setServiceNo(String serviceNo) {
    this.serviceNo = serviceNo;
  }

  public String getNotificationNo() {
    return notificationNo;
  }

  public void setNotificationNo(String notificationNo) {
    this.notificationNo = notificationNo;
  }

  public String getApplicationTime() {
    return applicationTime;
  }

  public void setApplicationTime(String applicationTime) {
    this.applicationTime = applicationTime;
  }

  public String getDeviceNo() {
    return deviceNo;
  }

  public void setDeviceNo(String deviceNo) {
    this.deviceNo = deviceNo;
  }

  public Integer getApplicationQty() {
    return applicationQty;
  }

  public void setApplicationQty(Integer applicationQty) {
    this.applicationQty = applicationQty;
  }

  @Override
  public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
  }

  /**
   * 订单是否来源于微信端徐工电商
   * @return
   */
  public Boolean isFromECommerce() {
    return SOURCE_E_COMMERCE.equals(this.source);
  }
}
